package com.qsn.tool.model.query;

<#assign myDateType = ["LocalDateTime","LocalDate"]/>
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * ${table.comment}查询条件
 *
 * @author ${author}
 * @date ${date}
 */
<#if entityLombokModel>
@Getter
@Setter
@ToString
</#if>
<#if superEntityClass??>
public class ${entity} implements ${superEntityClass}<#if activeRecord><${entity}></#if> {
<#elseif activeRecord>
public class ${entity} extends Model<${entity}> {
<#else>
@Schema(title = "${entity}InsertQuery", description = "${table.comment}添加入参")
public class ${entity}InsertQuery implements Serializable {
</#if>
    private static final long serialVersionUID = 1L;

<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.keyFlag>
    <#assign keyPropertyName="${field.propertyName}"/>
    </#if>
    @Schema(title = "${field.comment?replace("\r\n","")?replace("\r","")?replace("\n","")}")
    <#if myDateType?seq_contains(field.propertyType)>
    private Date ${field.propertyName};
    <#else>
    private ${field.propertyType} ${field.propertyName};
    </#if>
</#list>
<#------------  END 字段循环遍历  ---------->

}